/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_prod_sales_promotion.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_PROD_SALES_PROMOTION
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_prod_sales_promotion.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "app97_global.h" 
#include "table_ppm.h"

CTable_PPM_PROD_SALES_PROMOTION::CTable_PPM_PROD_SALES_PROMOTION( )
 :NPCRecordSet( )
{
  setTableName( "PPM_PROD_SALES_PROMOTION" );
  prepareTable();
  prepareQuery();
 
  ID.setField( "ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( ID );
  makeKeyItem( ID ); 
  SORT.setField( "SORT", DATA_CHAR, 20, 0 );
  makeTableItem( SORT );
  MODE_TYPE.setField( "MODE_TYPE", DATA_CHAR, 20, 0 );
  makeTableItem( MODE_TYPE );
  SALES_COST.setField( "SALES_COST", DATA_CHAR, 20, 0 );
  makeTableItem( SALES_COST );
  MOBILE_TYPE.setField( "MOBILE_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( MOBILE_TYPE );
  SOURCE.setField( "SOURCE", DATA_CHAR, 20, 0 );
  makeTableItem( SOURCE );
  DELIVER_TYPE.setField( "DELIVER_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( DELIVER_TYPE );
  ATTRIBUTE.setField( "ATTRIBUTE", DATA_CHAR, 20, 0 );
  makeTableItem( ATTRIBUTE );
  SERIAL.setField( "SERIAL", DATA_CHAR, 20, 0 );
  makeTableItem( SERIAL );
  TICKET_TYPE.setField( "TICKET_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( TICKET_TYPE );
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  STATE.setField( "STATE", DATA_CHAR, 6, 0 );
  makeTableItem( STATE );
  TYPE.setField( "TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( TYPE );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );

  SERIAL_NUMBER.setField( "SERIAL_NUMBER", DATA_CHAR, 250, 0 );

  makeTableItem( SERIAL_NUMBER );
  SUM_COST.setField( "SUM_COST", DATA_CHAR, 20, 0 );
  makeTableItem( SUM_COST );
  A_COST.setField( "A_COST", DATA_CHAR, 20, 0 );
  makeTableItem( A_COST );
  B_COST.setField( "B_COST", DATA_CHAR, 20, 0 );
  makeTableItem( B_COST );
  C_COST.setField( "C_COST", DATA_CHAR, 20, 0 );
  makeTableItem( C_COST );
  D_COST.setField( "D_COST", DATA_CHAR, 20, 0 );
  makeTableItem( D_COST );

}


CTable_PPM_PROD_SALES_PROMOTION::CTable_PPM_PROD_SALES_PROMOTION( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_PROD_SALES_PROMOTION" );
  prepareTable();
  prepareQuery();
 
  ID.setField( "ID", DATA_DOUBLE, 22, 1 );
  makeTableItem( ID );
  makeKeyItem( ID ); 
  SORT.setField( "SORT", DATA_CHAR, 20, 0 );
  makeTableItem( SORT );
  MODE_TYPE.setField( "MODE_TYPE", DATA_CHAR, 20, 0 );
  makeTableItem( MODE_TYPE );
  SALES_COST.setField( "SALES_COST", DATA_CHAR, 20, 0 );
  makeTableItem( SALES_COST );
  MOBILE_TYPE.setField( "MOBILE_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( MOBILE_TYPE );
  SOURCE.setField( "SOURCE", DATA_CHAR, 20, 0 );
  makeTableItem( SOURCE );
  DELIVER_TYPE.setField( "DELIVER_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( DELIVER_TYPE );
  ATTRIBUTE.setField( "ATTRIBUTE", DATA_CHAR, 20, 0 );
  makeTableItem( ATTRIBUTE );
  SERIAL.setField( "SERIAL", DATA_CHAR, 20, 0 );
  makeTableItem( SERIAL );
  TICKET_TYPE.setField( "TICKET_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( TICKET_TYPE );
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  STATE.setField( "STATE", DATA_CHAR, 6, 0 );
  makeTableItem( STATE );
  TYPE.setField( "TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( TYPE );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( CREATE_DATE );

  SERIAL_NUMBER.setField( "SERIAL_NUMBER", DATA_CHAR, 250, 0 );

  makeTableItem( SERIAL_NUMBER );
  SUM_COST.setField( "SUM_COST", DATA_CHAR, 20, 0 );
  makeTableItem( SUM_COST );
  A_COST.setField( "A_COST", DATA_CHAR, 20, 0 );
  makeTableItem( A_COST );
  B_COST.setField( "B_COST", DATA_CHAR, 20, 0 );
  makeTableItem( B_COST );
  C_COST.setField( "C_COST", DATA_CHAR, 20, 0 );
  makeTableItem( C_COST );
  D_COST.setField( "D_COST", DATA_CHAR, 20, 0 );
  makeTableItem( D_COST );
}

CTable_PPM_PROD_SALES_PROMOTION::~CTable_PPM_PROD_SALES_PROMOTION( )
{
    close();
}

